<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>分享数据</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../module/inventory/css/admin/index.css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
<script language="javascript" src="../script/Calendar.js"></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/yahoo-dom-event/yahoo-dom-event.js" ></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/dragdrop/dragdrop-min.js" ></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/calendar/calendar-min.js"></script>
<script type="text/javascript" src="../module/inventory/scripts/index.js"></script>
<script type="text/javascript" src="../script/jquery.validation.min.js"></script>
<script type="text/javascript" src="../script/Validator.js"></script>
<script src="../script/my_lightbox.js" language="javascript"></script>
</head>
<body>
    <div class="container">
        <div class="flow">
            <div class="itemtitle">
                <h3>分享数据</h3>
                <ul>
                    <li <{if $smarty.get.operation==''}>class="current"<{/if}>><a href="?m=share_data&s=share_data_list.php"><span>管理</span></a></li>
                    <li <{if $smarty.get.operation=='add'}>class="current"<{/if}>><a href="?m=share_data&s=share_data_add_edit.php&operation=add"><span>添加</span></a></li>
                    <{if $smarty.get.operation=='edit'}>
                    <li class="current"><a href="#"><span>修改</span></a></li>
                    <{/if}>
                </ul>
            </div>
        </div>
        <div class="h35"></div>
            <form name="form" id="form" method="post" onsubmit="return Validator.Validate(this,3)">
            <input name="id" type="hidden" id="id" value="<{$de.id}>">
            <table class="table">
                <thead>
                    <tr>
                        <th class="partition" colspan="99">分享数据</th>
                    </tr>
                </thead>
                <tbody>
                <tr>
                    <td width="100">链接</td>
                    <td>
                    <input name="url" id="url" type="text" class="w350" dataType="Require" msg="链接不能为空" value="<{if $smarty.get.operation=='add'}><{$getUrl}><{else}><{$de.url}><{/if}>"><div id="form-error" class="form-error"></div>
                    </td>
                </tr>
                
                <tr>
                    <td width="100">标题</td>
                    <td>
                    <input name="title" id="title" type="text" class="w350" dataType="Require" msg="标题不能为空" value="<{$de.title}>"><div id="form-error" class="form-error"></div>
                    </td>
                </tr>
                
                <tr>
                    <td>分享图片</td>
                    <td>
                    <input name="pic" class="w350" type="text" id="pic" dataType="Require" msg="图片不能为空" value="<{$de.pic}>" />
                    [<a href="javascript:uploadfile('上传图片','pic',0,0,'sharedata')">上传</a>] 
                    [<a href="javascript:preview('pic');">预览</a>]
                    [<a onclick="javascript:$('#pic').val('');" href="#">删除</a>] <span class="bz"></span>
                    </td>
                </tr>
                <tr>
                    <td>描述</td>
                    <td><textarea name="desc" id="desc" cols="45" rows="5" class="text"><{$de.desc}></textarea></td>
                </tr>
                <tr>
                    <td>展示状态</td>
                    <td>
                    <input type="radio" name="status" value="1" id="open" <{if $de.status==1}>checked="checked"<{/if}>/><label for="open">开启</label>
                    <input type="radio" name="status" value="0" id="close" <{if $de.status==0}>checked="checked"<{/if}>/><label for="close">关闭</label>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                    <input class="submit" type="submit" value="提交">
                    <input name="act" type="hidden" id="action" value="<{if !$smarty.get.editid}>save<{else}>edit<{/if}>">
                    </td>
                </tr>
                </tbody>
            </table>
            </form>
    </div>
</body>
</html>